package chapter1.date.task;
/*
1:一件商品生产日期是2017/7/12,保质期5年，算出失效日期
 */

import java.text.SimpleDateFormat;
import java.util.*;

public class Task1 {
    public static void main(String[] args) {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/M/dd");
        Calendar calendar = Calendar.getInstance();
        calendar.set(2017, 6, 12);
        calendar.add(calendar.YEAR, 5);
        System.out.println("失效日期：" + simpleDateFormat.format(calendar.getTime()));
    }
}
